<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../common/public_header_main.jsp"%>

<link rel="stylesheet" href="${ctx_static }/dep/chosen/css/chosen.css">
<link rel="stylesheet" href="${ctx_static }/dep/bootstrap-datetimepicker/css/bootstrap-datetimepicker.css"/>
<link rel="stylesheet" href="${ctx_static }/home/consultcenter/css/infoManagement.css">

<div class="row">
    <div class="col-lg-12 col-sm-12 col-xs-12">
        <div class="widget">
            <div class="widget-header">
                <div class="widget-buttons">
                    <a href="#" data-toggle="collapse">
                        <i class="fa fa-minus"></i>
                    </a>
                    <a href="#" data-toggle="dispose">
                        <i class="fa fa-times"></i>
                    </a>
                </div>
                <!--Widget Buttons-->
            </div>
            <!--Widget Header-->
            <div class="widget-body">
                <div class="widget-main">
                    <div class="row row_padding form-horizontal">
                        <div class="col-md-4 col-sm-3 col-xs-12">
                            <div class="form-group">
                                <label class="col-lg-2 col-md-3 col-sm-3 control-label no-padding-right">日期</label>
                                <div class="col-lg-10 col-md-9 col-sm-9">
                                    <div class="controls">
                                        <div class="input-group date">
                                            <input class="form-control" id="reservation" type="text">
                                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="col-md-5 col-sm-6 col-xs-12">
                            <div class="form-group col-md-9 col-sm-4 no-margin-right">
                                <input class="form-control" placeholder="采集人/电话咨询师/分校/姓名/课程/级别" type="text" id="searchVal" name="searchVal" onkeydown="search();">
                            </div>
                            <div class="form-group col-md-3 col-sm-4">
                                <a type="button" class="btn btn-blue form-control search-btn" href="javascript:DataTable.init();">搜索
                                </a>

                            </div>
                        </div>


                        <div class="col-md-3 col-sm-3 col-xs-12 btn-group">
                            <span class="btn btn-default pointer" title="View print view"><span>打印</span></span>
                            <div class="btn-group">
                                <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">导出
                                    <i class="fa fa-angle-up"></i>
                                </button>
                                <ul class="dropdown-menu" role="menu">
                                    <li><a href="#">保存PDF</a></li>
                                    <li><a href="#">导出EXCEL</a></li>
                                    <li><a href="#">导出CSV</a></li>
                                </ul>
                            </div>
                            <shiro:hasPermission name="consultInfoManage:add">
                            <button class="btn increase  pull-right col-sm-4" data-toggle="modal" data-backdrop="static" data-target="#addInquiries">新增
                                <i class="fa fa-plus-square-o right"></i></button>
                            </shiro:hasPermission>
                        </div>
                    </div>
                    <div class="dataTables_wrapper form-inline no-footer">
                         <!-- <div class="table-scrollable"> -->
                            <table id="infoManage" class="table table-striped table-hover table-bordered dataTable no-footer" style="white-space:nowrap">
                                <thead>
                                <tr role="row">
                                    <th>
                                        <label>
                                            <input type="checkbox" class="checkAll">
                                            <span class="text"></span>
                                        </label>
                                    </th>
                                    <th>创建日期</th>
                                    <th>归属部门</th>
                                    <th>状态</th>
                                    <th>采集人</th>
                                    <th>电话咨询师</th>
                                    <th>咨询者类型</th>
                                    <th>分校</th>
                                    <th>品牌</th>
                                    <th>姓名</th>
                                    <th>课程</th>
                                    <th>级别</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                </tbody>
                            </table>
                		<!-- </div> -->
                		</div>
                		</div>
                </div>
        </div>
    </div>

</div>

<!--创建咨询量-->
<div class="modal fade addInquiries" id="addInquiries" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header bordered-blue">
                <button type="button" class="close" data-dismiss="modal"><span
                        aria-hidden="true">&times;</span><span class="sr-only">Close</span>
                </button>
                <span class="widget-caption">创建咨询量</span>
            </div>
            <div class="modal-body">
                <form class="form-horizontal clearfix" id="inquiries" method="post"> 
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">信息归属地
						<span class="control-label mandatory">*</span></label>
                        <div class="col-sm-7 no-padding-right">
                            <select id="departmentId1" name="departmentId1" class="form-control departmentId1 chosen-select" data-placeholder="--请选择--" tabindex="1">
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">电话归属地
						<span class="control-label mandatory">*</span></label>
                        <div class="col-sm-7 no-padding-right">
                            <input id="phoneBelong" name="phoneBelong" class="form-control phoneBelong" placeholder="--请选择--">
                        	<div class="attribution">
							    <div class="modal-dialog modal-sm">
							        <div class="modal-content">
							            <div class="attribution-body">
							                <div class="form-horizontal">
							                    <div class="form-group">
							                        <label class="control-label col-sm-3 no-padding-right">省份</label>
							                        <div class="col-sm-8">
							                            <select name="province"  id="province" class="form-control province chosen-select" data-placeholder="--请选择--" tabindex="1">
							                            </select>
							                        </div>
							                    </div>
							                    <div class="form-group">
							                        <label class="control-label col-sm-3 no-padding-right">城市</label>
							                        <div class="col-sm-8">
							                            <select name="city" id="city" class="form-control city chosen-select" data-placeholder="--请选择--" tabindex="1">
							                                <option value="0">--请选择--</option>
							                            </select>
							                        </div>
							                    </div>
							                    <div class="form-group modal-footer">
							                        <div class="col-sm-2 col-sm-offset-3 margin-right-20">
							                            <button type="button" class="btn btn-primary btn-sm confirm-btn">确定</button>
							                        </div>
													<div class="col-sm-2">
							                            <button type="button" class="btn btn-danger btn-sm cancel-btn">取消</button>
							                        </div>
							                    </div>
							                </div>
							            </div>
							        </div>
							    </div>
							</div>
                        </div>
                    </div>

                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">招生品牌
						<span class="control-label mandatory">*</span></label>
                        <div class="col-sm-7 no-padding-right"">
                            <select name="brandId" id="brandId" class="form-control">
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">咨询者类型
						<span class="control-label mandatory">*</span></label>
                        <div class="col-sm-7 no-padding-right">
                            <select name="studentAttrId2" id="studentAttrId2" class="form-control studentAttrId2">
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">媒体来源
						<span class="control-label mandatory">*</span></label>
                        <div class="col-sm-7 no-padding-right">
                            <select name="studentAttrId1" id="studentAttrId1" class="form-control studentAttrId1">
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">关键词
						<span class="control-label mandatory">*</span></label>
                        <div class="col-sm-7 no-padding-right">
                            <input type="text" class="form-control" name="keyword" id="keyword">
                        </div>
                    </div>
                    <div class="form-group col-sm-12">
                        <label class="control-label col-md-2 col-sm-3 no-padding-right margin-left padding-right-5">对话页面链接</label>
                        <div class="pull-left col-md-9 col-sm-9">
                            <input type="tel" class="form-control" name="pageUrl">
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">姓名
						<span class="control-label mandatory">*</span></label>
                        <div class="col-sm-7 no-padding-right">
                            <input type="text" class="form-control" name="studentName">
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">电话
						<span class="control-label mandatory">*</span></label>
                        <div class="col-sm-7 no-padding-right">
                            <input type="tel" class="form-control phone" name="studentPhone">
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right padding-right-5">性别</label>
                        <div class="col-sm-7 no-padding-right">
                            <select name="studentSex" class="form-control">
                                <option value="0">男</option>
                                <option value="1">女</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right padding-right-5">微信</label>
                        <div class="col-sm-7 no-padding-right">
                            <input type="text" class="form-control" name="weChat">
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right padding-right-5">年龄</label>
                        <div class="col-sm-7 no-padding-right">
                            <input type="text" class="form-control" name="age">
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right padding-right-5">QQ</label>
                        <div class="col-sm-7 no-padding-right">
                            <input type="text" class="form-control" name="tengXun">
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">咨询课程
						<span class="control-label mandatory">*</span></label>
                        <div class="col-sm-7 no-padding-right">
                            <select name="projectId" id="projectId" class="form-control projectId chosen-select">
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right padding-right-5">课程级别</label>
                        <div class="col-sm-7 no-padding-right">
                            <select name="projectLevelId" id="projectLevelId" class="form-control projectLevelId">
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right padding-right-5">最高学历</label>
                        <div class="col-sm-7 no-padding-right"">
                            <!-- <input name="highestEducation" id="highestEducation" class="form-control highestEducation">
                            </input> -->
                            <select name="highestEducationName" id="highestEducationName" class="form-control highestEducationName"></select>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right padding-right-5">专业</label>
                        <div class="col-sm-7 no-padding-right">
                            <input name="majorName" id="majorName" class="form-control majorId">
                            </input>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right padding-right-5">民族</label>
                        <div class="col-sm-7 no-padding-right">
                            <select class="form-control chosen-select" id="nations" data-placeholder="--请选择--" tabindex="1"></select>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right padding-right-5">毕业院校</label>
                        <div class="col-sm-7 no-padding-right">
                            <input type="text" class="form-control" name="graduateInstitutions">
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right padding-right-5">紧急联系人</label>
                        <div class="col-sm-7 no-padding-right">
                            <input type="text" class="form-control" name="emergencyContact">
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-6 no-padding-right contact-way padding-right-5">紧急联系人方式</label>
                        <div class="col-sm-7 no-padding-right">
                            <input type="text" class="form-control" name="emergencyContactMode">
                        </div>
                    </div>
                    <div class="form-group col-md-12">
                        <label class="control-label col-sm-2 no-padding-right forward-visit">期待回访日期</label>
                        <div class="col-sm-6 forward-visit-time">
                            <div class="input-group">
                                <input class="form-control recordnexttime" name="recordnexttime" type="text">
                                <span class="input-group-addon">
                                    <i class="fa fa-calendar"></i>
                                </span>
                            </div>
                        </div>
                    </div>
                    <div class="form-group col-sm-12">
                        <label class="control-label col-md-2 col-sm-3 no-padding-right margin-left padding-right-5">备注</label>
                        <div class="col-md-9 col-sm-9">
                            <input type="text" class="form-control notes" name="notes" id="notes">
                        </div>
                    </div>
                    <div class="form-group col-sm-12 dialogueRecord">
                        <label class="control-label col-md-2 col-sm-3 no-padding-right margin-left padding-right-5">对话记录<span id="talk"> </span></label>
                        <div class="col-sm-10">
                        
                           <!-- 富文本编辑器 -->
						  <textarea name="conversation" id="conversation" class="conversation" style="width:500px;height:400px;visibility:hidden;"></textarea>
                          
                          <script>
							$.getScript('${ctx_static }/dep/kindeditor-4.1.7/kindeditor-min.js', function() {
								KindEditor.basePath = '${ctx_static }/dep/kindeditor-4.1.7/';
								editor = KindEditor.create('textarea[name="conversation"]',{
									uploadJson:'${ctx }/file/uploadFile',
									resizeType:0 
								});
							});
                          </script>                           
                    </div>
                    </div>
                    <div class="form-group col-sm-12 modal-footer">
                        <div class="col-sm-2  col-sm-offset-4">
                            <button type="submit" class="btn btn-primary form-control creation-btn" data-toggle="modal"
                                    data-backdrop="static">创建
                            </button>
                        </div>
                           <div class="col-sm-2">
                            <button type="button" class="btn btn-danger form-control" data-dismiss="modal">取消
                            </button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<!--错误提示-->
<div class="modal fade" id="errorPrompt" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header bordered-blue">
                <button type="button" class="close" data-dismiss="modal"><span
                        aria-hidden="true">&times;</span><span class="sr-only">Close</span>
                </button>
                <span class="widget-caption">错误提示</span>
            </div>
            <div class="modal-body">
                <p>该学员同项目电话号码已经由王伟在2016/10/24 13:52:00录入,是否添加新咨询课程?</p>
                <div class="row modal-footer">
                    <div class="col-sm-6">
                        <button type="button" class="btn btn-danger" data-dismiss="modal">否
                        </button>
                    </div>

                    <div class="col-sm-6">
                        <button type="button" class="btn btn-primary margin-right-20 confirm-btn" data-toggle="modal"
                                data-backdrop="static"
                                data-target="#addRepeatedPhone">是
                        </button>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--重复电话添加新咨询课程-->
<div class="modal fade" id="addRepeatedPhone" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header bordered-blue">
                <button type="button" class="close" data-dismiss="modal"><span
                        aria-hidden="true">&times;</span><span class="sr-only">Close</span>
                </button>
                <span class="widget-caption">创建咨询量</span>
            </div>
            <div class="modal-body">
                <form class="form-horizontal" id="repeatedPhone">
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">信息归属地：</label>
                        <div class="col-sm-7">
                            <select name="infoAttribution" class="form-control">
                                <option value="0">北京</option>
                                <option value="1">上海</option>
                                <option value="2">天津</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">电话归属地：</label>
                        <div class="col-sm-7">
                             <input id="" name="" class="form-control" placeholder="--请选择--">
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">招生品牌：</label>
                        <div class="col-sm-7">
                            <select name="admissionsBrand" class="form-control">
                                <option value="0">学慧网</option>
                                <option value="1">所属品牌2</option>
                                <option value="2">所属品牌3</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">咨询者类型：</label>
                        <div class="col-sm-7">
                            <select name="consultantType" class="form-control">
                                <option value="0">学员</option>
                                <option value="1">类型2</option>
                                <option value="2">类型3</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">媒体来源：</label>
                        <div class="col-sm-7">
                            <select name="mediaSources" class="form-control">
                                <option value="0">留言</option>
                                <option value="1">论坛</option>
                                <option value="2">贴吧</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">关键词：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" name="keyword">
                        </div>
                    </div>
                    <div class="form-group col-sm-12">
                        <label class="control-label col-md-2 col-sm-3 no-padding-right margin-left">对话页面链接：</label>
                        <div class="pull-left col-md-9 col-sm-9">
                            <input type="tel" class="form-control" name="dialogueLink">
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">姓名：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" name="name">
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">电话：</label>
                        <div class="col-sm-7">
                            <input type="tel" class="form-control phone" name="phone">
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">性别：</label>
                        <div class="col-sm-7">
                            <select name="sex" class="form-control">
                                <option value="0">男</option>
                                <option value="1">女</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">微信：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" name="WeChat">
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">年龄：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" name="age">
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">QQ：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" name="qq">
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">咨询课程：</label>
                        <div class="col-sm-7">
                            <select name="counselingCourse" class="form-control">
                                <option value="0">人力资源管理</option>
                                <option value="1">金融管理</option>
                                <option value="2">行政管理</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">课程级别：</label>
                        <div class="col-sm-7">
                            <select name="coursesLevel" class="form-control">
                                <option value="0">一级</option>
                                <option value="1">二级</option>
                                <option value="2">三级</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">最高学历：</label>
                        <div class="col-sm-7">
                            <select name="education" class="form-control">
                                <option value="0">博士</option>
                                <option value="1">硕士</option>
                                <option value="2">本科</option>
                                <option value="3">专科</option>
                                <option value="4">高中</option>
                            </select>
                        </div>
                    </div>
                    <div class="form-group col-sm-12">
                        <label class="control-label col-md-2 col-sm-3 no-padding-right margin-left">备注：</label>
                        <div class="col-md-9 col-sm-9">
                            <input type="text" class="form-control" name="remark">
                        </div>
                    </div>
                    <div class="form-group col-sm-12 dialogueRecord">
                        <label class="control-label col-md-2 col-sm-3 no-padding-right margin-left">对话记录：</label>
                        <div class="col-md-9 col-sm-9">
                            <div class="btn-toolbar wysiwyg-toolbar" data-role="editor-toolbar" data-target="#editor">
                                <div class="btn-group">
                                    <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" title=""
                                       data-original-title="Font"><i class="fa fa-font"></i><b class="caret"></b></a>
                                    <ul class="dropdown-menu">
                                        <li><a data-edit="fontName Serif" style="font-family:'Serif'">Serif</a></li>
                                        <li><a data-edit="fontName Sans" style="font-family:'Sans'">Sans</a></li>
                                        <li><a data-edit="fontName Arial" style="font-family:'Arial'">Arial</a></li>
                                        <li><a data-edit="fontName Arial Black" style="font-family:'Arial Black'">Arial
                                            Black</a></li>
                                        <li><a data-edit="fontName Courier" style="font-family:'Courier'">Courier</a>
                                        </li>
                                        <li><a data-edit="fontName Courier New" style="font-family:'Courier New'">Courier
                                            New</a></li>
                                        <li><a data-edit="fontName Comic Sans MS" style="font-family:'Comic Sans MS'">Comic
                                            Sans MS</a></li>
                                        <li><a data-edit="fontName Helvetica"
                                               style="font-family:'Helvetica'">Helvetica</a></li>
                                        <li><a data-edit="fontName Impact" style="font-family:'Impact'">Impact</a></li>
                                        <li><a data-edit="fontName Lucida Grande" style="font-family:'Lucida Grande'">Lucida
                                            Grande</a></li>
                                        <li><a data-edit="fontName Lucida Sans" style="font-family:'Lucida Sans'">Lucida
                                            Sans</a></li>
                                        <li><a data-edit="fontName Tahoma" style="font-family:'Tahoma'">Tahoma</a></li>
                                        <li><a data-edit="fontName Times" style="font-family:'Times'">Times</a></li>
                                        <li><a data-edit="fontName Times New Roman"
                                               style="font-family:'Times New Roman'">Times New Roman</a></li>
                                        <li><a data-edit="fontName Verdana" style="font-family:'Verdana'">Verdana</a>
                                        </li>
                                    </ul>
                                </div>
                                <div class="btn-group">
                                    <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" title=""
                                       data-original-title="Font Size"><i class="fa fa-text-height"></i>&nbsp;<b
                                            class="caret"></b></a>
                                    <ul class="dropdown-menu dropdown-default">
                                        <li><a data-edit="fontSize 5"><font size="5">Huge</font></a></li>
                                        <li><a data-edit="fontSize 3"><font size="3">Normal</font></a></li>
                                        <li><a data-edit="fontSize 1"><font size="1">Small</font></a></li>
                                    </ul>
                                </div>
                                <div class="btn-group">
                                    <a class="btn btn-default" data-edit="bold" title=""
                                       data-original-title="Bold (Ctrl/Cmd+B)"><i class="fa fa-bold"></i></a>
                                    <a class="btn btn-default" data-edit="italic" title=""
                                       data-original-title="Italic (Ctrl/Cmd+I)"><i class="fa fa-italic"></i></a>
                                    <a class="btn btn-default" data-edit="strikethrough" title=""
                                       data-original-title="Strikethrough"><i class="fa fa-strikethrough"></i></a>
                                    <a class="btn btn-default" data-edit="underline" title=""
                                       data-original-title="Underline (Ctrl/Cmd+U)"><i class="fa fa-underline"></i></a>
                                </div>
                                <div class="btn-group">
                                    <a class="btn btn-default" data-edit="insertunorderedlist" title=""
                                       data-original-title="Bullet list"><i class="fa fa-list-ul"></i></a>
                                    <a class="btn btn-default" data-edit="insertorderedlist" title=""
                                       data-original-title="Number list"><i class="fa fa-list-ol"></i></a>
                                    <a class="btn btn-default" data-edit="outdent" title=""
                                       data-original-title="Reduce indent (Shift+Tab)"><i class="fa fa-outdent"></i></a>
                                    <a class="btn btn-default" data-edit="indent" title=""
                                       data-original-title="Indent (Tab)"><i class="fa fa-indent"></i></a>
                                </div>
                                <div class="btn-group">
                                    <a class="btn btn-default btn-active" data-edit="justifyleft" title=""
                                       data-original-title="Align Left (Ctrl/Cmd+L)"><i
                                            class="fa fa-align-left"></i></a>
                                    <a class="btn btn-default" data-edit="justifycenter" title=""
                                       data-original-title="Center (Ctrl/Cmd+E)"><i class="fa fa-align-center"></i></a>
                                    <a class="btn btn-default" data-edit="justifyright" title=""
                                       data-original-title="Align Right (Ctrl/Cmd+R)"><i class="fa fa-align-right"></i></a>
                                    <a class="btn btn-default" data-edit="justifyfull" title=""
                                       data-original-title="Justify (Ctrl/Cmd+J)"><i
                                            class="fa fa-align-justify"></i></a>
                                </div>
                                <div class="btn-group">
                                    <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" title=""
                                       data-original-title="Hyperlink"><i class="fa fa-link"></i></a>
                                    <div class="dropdown-menu dropdown-arrow">
                                        <div class="input-group">
                                            <input class="form-control" placeholder="URL" type="text"
                                                   data-edit="createLink">
                                                    <span class="input-group-btn">
                                                        <button class="btn btn-default" type="button">Add</button>
                                                    </span>
                                        </div>
                                    </div>
                                    <a class="btn btn-default" data-edit="unlink" title=""
                                       data-original-title="Remove Hyperlink"><i class="fa fa-cut"></i></a>
                                </div>

                                <div class="btn-group">
                                    <a class="btn btn-default" title="" id="pictureBtn"
                                       data-original-title="Insert picture (or just drag &amp; drop)"><i
                                            class="fa fa-picture-o"></i></a>
                                    <input type="file" data-role="magic-overlay" data-target="#pictureBtn"
                                           data-edit="insertImage"
                                           style="opacity: 0; position: absolute; top: 0px; left: 0px; width: 41px; height: 32px;">
                                </div>
                                <div class="btn-group">
                                    <a class="btn btn-default" data-edit="undo" title=""
                                       data-original-title="Undo (Ctrl/Cmd+Z)"><i class="fa fa-undo"></i></a>
                                    <a class="btn btn-default" data-edit="redo" title=""
                                       data-original-title="Redo (Ctrl/Cmd+Y)"><i class="fa fa-repeat"></i></a>
                                </div>
                                <input type="text" data-edit="inserttext" class="wysiwyg-voiceBtn" id="voiceBtn"
                                       x-webkit-speech="" style="display: none;">
                            </div>
                            <div class="wysiwyg-editor" id="editor1" contenteditable="true">
                            </div>
                        </div>
                    </div>
                    <div class="form-group col-sm-12 modal-footer">
                        <div class="col-sm-2 col-sm-offset-4">
                            <button type="button" class="btn btn-danger form-control" data-dismiss="modal">
                                取消
                            </button>
                        </div>
                        <div class="col-sm-2">
                            <button type="submit" class="btn btn-primary form-control creation-btn" data-toggle="modal"
                                    data-backdrop="static">创建
                            </button>
                        </div>
                    </div>
                </form>
            </div>
         <!--电话归属地-->
            <div class="attribution">
                <div class="modal-dialog modal-sm">
                    <div class="modal-content">
                        <div class="modal-body">
                            <form class="form-horizontal">
                                <div class="form-group">
                                    <label class="control-label col-sm-3 no-padding-right">省份</label>
                                    <div class="col-sm-8">
                                        <select name="province"  id="province" class="form-control province chosen-select" data-placeholder="--请选择--" tabindex="1">
                                        	 <option value="0">--请选择--</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label class="control-label col-sm-3 no-padding-right">城市</label>
                                    <div class="col-sm-8">
                                        <select name="city" id="city" class="form-control city chosen-select" data-placeholder="--请选择--" tabindex="1">
                                        <option value="0">--请选择--</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="form-group modal-footer">
                                    <div class="col-sm-2 col-sm-offset-3 margin-right-20">
                                        <button type="reset" class="btn btn-danger btn-sm cancel-btn">取消
                                        </button>
                                    </div>
                                    <div class="col-sm-2">
                                        <button type="button" class="btn btn-primary btn-sm confirm-btn">确定
                                        </button>
                                    </div>

                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!--查看-->
<div class="modal fade viewInfo" id="viewInfo" tabindex="-1" role="dialog"
     aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header bordered-blue">
                <button type="button" class="close" data-dismiss="modal"><span
                        aria-hidden="true">&times;</span><span class="sr-only">Close</span>
                </button>
                <span class="widget-caption">咨询者信息</span>
            </div>
            <div class="modal-body">
                <form class="form-horizontal clearfix">
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">信息归属地：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control departmentName1" value="" id="departmentName1" disabled>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">电话归属地：</label>
                        <div class="col-sm-7">
                           <input type="text" class="form-control phoneBelongView" value="" id="phoneBelongView" disabled>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">招生品牌：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control brandNameView" value="" id="brandNameView" disabled>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">咨询者类型：</label>
                        <div class="col-sm-7">
                             <input type="text" class="form-control studentAttrName2" value="" id="studentAttrName2" disabled>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">媒体来源：</label>
                        <div class="col-sm-7">
                           <input type="text" class="form-control studentAttrName1" value="" id="studentAttrName1" disabled>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">关键词：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control keywordView" name="keywordView" id="keywordView" value="" disabled>
                        </div>
                    </div>
                    <div class="form-group col-sm-12">
                        <label class="control-label col-md-2 col-sm-3 no-padding-right margin-left">对话页面链接：</label>
                        <div class="pull-left col-md-9 col-sm-9">
                            <input type="text" class="form-control pageUrlView" name="pageUrlView" id="pageUrlView" disabled>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">姓名：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control studentNameView" name="studentNameView" id="studentNameView" disabled>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">电话：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control studentPhoneView" name="studentPhoneView" id="studentPhoneView" disabled>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">性别：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control studentSexView" name="studentSexView" id="studentSexView" disabled>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">微信：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control wechatView" name="wechatView" id="wechatView" disabled>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">年龄：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control ageView" name="ageView" id="ageView" disabled>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">QQ：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control tengXunView" name="tengXunView" id="tengXunView" disabled>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">咨询课程：</label>
                        <div class="col-sm-7">
                           <input type="text" class="form-control projectNameView" name="projectNameView" id="projectNameView" disabled>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">课程级别：</label>
                        <div class="col-sm-7">
                             <input type="text" class="form-control projectLevelNameView" name="projectLevelNameView" id="projectLevelNameView" disabled>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">最高学历：</label>
                        <div class="col-sm-7">
                           <input type="text" class="form-control highestEducationView" value="" id="highestEducationView" disabled>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">专业：</label>
                        <div class="col-sm-7">
                            <input name="majorNameView" id="majorNameView" class="form-control majorIdView" disabled>
                            </input>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">民族：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" name="nationView" id="nationView" disabled>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">毕业院校：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" name="graduateInstitutionsView" id="graduateInstitutionsView" disabled>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-5 no-padding-right">紧急联系人：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" name="emergencyContactView" id="emergencyContactView" disabled>
                        </div>
                    </div>
                    <div class="form-group col-md-4 col-sm-6">
                        <label class="control-label col-sm-6 no-padding-right contact-way">紧急联系人方式：</label>
                        <div class="col-sm-7">
                            <input type="text" class="form-control" name="emergencyContactModeView" id="emergencyContactModeView" disabled>
                        </div>
                    </div>
                    <div class="form-group col-sm-12">
                        <label class="control-label col-md-2 col-sm-3 no-padding-right margin-left">备注：</label>
                        <div class="col-md-9 col-sm-9">
                            <input type="text" class="form-control notesView" name="notesView" id="notesView" disabled>
                        </div>
                    </div>
                    <div class="form-group col-sm-12 dialogueRecord">
                        <label class="control-label col-md-2 col-sm-3 no-padding-right margin-left">对话记录：</label>
                        <div class="col-md-9 col-sm-9">
                           <!--  <textarea class="form-control conversationView" rows="8" id="conversationView" disabled></textarea> -->
                            <!-- 富文本编辑器 -->
						  <textarea name="conversation2" id="conversation" class="conversation" style="width:500px;height:400px;visibility:hidden;"></textarea>
                          
                          <script>
							$.getScript('${ctx_static }/dep/kindeditor-4.1.7/kindeditor-min.js', function() {
								KindEditor.basePath = '${ctx_static }/dep/kindeditor-4.1.7/';
								editor2 = KindEditor.create('textarea[name="conversation2"]',{
									uploadJson:'${ctx }/file/uploadFile'
								});
							});
                          </script>    
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<script>
//加载表单
var DataTable = function(){
	return {
		init: function () {
			var dutyTable = $('#infoManage').dataTable({
				"bPaginate": true,  //是否显示分页
            	"bLengthChange": true,//每页显示的记录数
            	"bFilter": false, //搜索栏
            	"bSort": true, //是否支持排序功能
            	"bInfo": true, //显示表格信息
            	"bAutoWidth": false,  //自适应宽度
            	"bStateSave": true, //保存状态到cookie *************** 很重要 ， 当搜索的时候页面一刷新会导致搜索的消失。使用这个属性就可避免了
            	//"sPaginationType": "", //分页，一共两种样式，full_numbers和two_button(默认)
            	"sAjaxSource" : ctx+'/consultInfoManage/loadM',
        		"fnServerData": retrieveData,//用于替换默认发到服务端的请求操作  
            	"bServerSide": true,
            	"bDestroy": true,
                "bRetrieve": false,
                "oLanguage" : {
                	"sLengthMenu" : "每页显示 _MENU_ 条记录",
        			"sZeroRecords" : "抱歉， 没有找到",
        			"sInfo" : "从 _START_ 到 _END_ / 共 _TOTAL_ 条数据",
        			"sInfoEmpty" : "找不到相关数据",
        			"sInfoFiltered" : "数据表中共为 _MAX_ 条记录)",
        			"sProcessing": "正在加载中...",
        			"sSearch": "搜索",
        			"oPaginate" : {
        				"sFirst" : "首页",
        				"sPrevious" : "前一页",
        				"sNext" : "后一页",
        				"sLast" : "尾页"
        			},
                },
                "aoColumns" : [
						{
						    "mData": "infoManageId", 'sClass': "text-center", "bSortable": false, "mRender": function (data, type, full) {
						    return '<label  class="labletab" style="padding-top: 0px"> <input name="ajaxcheckbox" type="checkbox" class="checkchild" > <span class="text" ></span> </label>';
						}
						},
						{"mData": "createDate", 'sClass': "text-center"},
						{"mData": "departmentName2", 'sClass': "text-center"},
						{"mData": "status", 'sClass': "text-center"},
						{"mData": "createUserName", 'sClass': "text-center"},
						{"mData": "counselor", 'sClass': "text-center"},
						{"mData": "studentAttrName2", 'sClass': "text-center"},
						{"mData": "departmentName1", 'sClass': "text-center"},
						{"mData": "brandName", 'sClass': "text-center"},
						{"mData": "studentName", 'sClass': "text-center"},
						{"mData": "projectName", 'sClass': "text-center"},
						{"mData": "projectLevelName", 'sClass': "text-center"},
						{
			                "mData": "infoManageId",
			                'sClass': "text-center",
			                "bSortable": false,
			                "mRender": function (data, type, full ) {
			                    var u = "<a data-record='"+JSON.stringify(full)+"' class='btn btn-warning btn-xs edit' data-backdrop='static'><i class='fa fa-folder-open-o'></i> 查看</a>";
			                    var d = '<shiro:hasPermission name="consultInfoManage:delete"><a href="#" class="btn btn-danger btn-xs delete" onclick="deleteInfoManage(\''+full["infoManageId"]+'\')"><i class="fa fa-trash-o"></i> 删除</a></shiro:hasPermission>';
			                    return u+d;
			                }
			            }

                ],
                "aoColumnDefs": [{
	   	            sDefaultContent: '',
	   	            aTargets: ['_all']
	   	        }],
	   	     "fnRowCallback":function(nRow,aData,iDisplayIndex){
	   	    	if(aData.status=='1'){
	   	    		$('td:eq(3)',nRow).html('已创建');
	   	    	}else if(aData.status=='2'){
	   	    		$('td:eq(3)',nRow).html('待沟通');
	   	    	}else if(aData.status=='3'){
	   	    		$('td:eq(3)',nRow).html('已沟通');
	   	    	}else if(aData.status=='4'){
	   	    		$('td:eq(3)',nRow).html('预约');
	   	    	}else if(aData.status=='5'){
	   	    		$('td:eq(3)',nRow).html('上门');
	   	    	}else if(aData.status=='6'){
	   	    		$('td:eq(3)',nRow).html('订座');
	   	    	}else if(aData.status=='7'){
	   	    		$('td:eq(3)',nRow).html('报名');
	   	    	}else{
	   	    		$('td:eq(3)',nRow).html('已创建');
	   	    	}
	   	    	return nRow;
	   	     },
			});
			$("#infoManage_wrapper").removeClass();
			$('#infoManage_wrapper').addClass("table-scrollable");
		}
	}
}();

</script>

<script src="${ctx_static }/dep/chosen/js/chosen.jquery.js"></script>
<script src="${ctx_static }/home/consultcenter/js/infoManagement.js"></script>
<!--日期插件-->
<script src="${ctx_static }/dep/assets/js/datetime/bootstrap-datepicker.js"></script>
<script src="${ctx_static }/dep/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
